package com.stu.dcxy.redis;

import cn.hutool.core.util.ReflectUtil;
import org.springframework.util.ReflectionUtils;

import java.lang.reflect.Method;
import java.util.Collections;
import java.util.List;

/**
 * @Author: MI
 * @Date: 2022/3/14/23:53
 * @Description: https://cdn.jsdelivr.net/gh/qianlicao51/files@main/img/2022-03/20220314235536.png
 */
public class Demo {

    public static void main(String[] args) {
        List<String> a = Collections.singletonList("A");
        Demo demo = new Demo();
        Method method = ReflectUtil.getMethod(demo.getClass(), "say");
        ReflectionUtils.invokeMethod(method, demo, null);
        ReflectUtil.invoke(demo, method, null);

    }

    public void say() {
        System.out.println("Demo.say");
    }

    //https://cdn.jsdelivr.net/gh/qianlicao51/files@main/img/2022-03/20220316232159.png
    public void redisLock() {
    }
}
